package com.tudouji.project.store.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import com.tudouji.framework.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 库存单位对象 stockunit
 *
 * @author tudouji
 * @date 2021-01-06
 */
@Data
public class Stockunit
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 单位名称 */
    @Excel(name = "单位名称")
    private String unitName;

    /** 是否重量单位 */
    @Excel(name = "是否重量单位")
    private Integer isUnit;

    /** 与公斤的换算率 */
    @Excel(name = "与公斤的换算率")
    private BigDecimal toKg;

    /** 与吨的换算率 */
    @Excel(name = "与吨的换算率")
    private BigDecimal toT;

    private String kdunit;

    //前台展示需要
    private Integer type;// 1-库存单位，2-销售单位

    private String createby;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createtime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUnitName(String unitName)
    {
        this.unitName = unitName;
    }

    public String getUnitName()
    {
        return unitName;
    }
    public void setIsUnit(Integer isUnit)
    {
        this.isUnit = isUnit;
    }

    public Integer getIsUnit()
    {
        return isUnit;
    }
    public void setToKg(BigDecimal toKg)
    {
        this.toKg = toKg;
    }

    public BigDecimal getToKg()
    {
        return toKg;
    }
    public void setToT(BigDecimal toT)
    {
        this.toT = toT;
    }

    public BigDecimal getToT()
    {
        return toT;
    }

    public String getCreateby() {
        return createby;
    }

    public void setCreateby(String createby) {
        this.createby = createby;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getKdunit() {
        return kdunit;
    }

    public void setKdunit(String kdunit) {
        this.kdunit = kdunit;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("unitName", getUnitName())
            .append("isUnit", getIsUnit())
            .append("toKg", getToKg())
            .append("toT", getToT())
            .append("createby", getCreateby())
            .append("createtime", getCreatetime())
            .toString();
    }
}
